package com.chuanyang.driverh.sqlite;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class MySqliteHistoryAddressHelper extends SQLiteOpenHelper{
	
	private static final String DB_NAME = "cyt.db"; //数据库名称
    private static final int VERSION = 1;    //数据库版本  

	public MySqliteHistoryAddressHelper(Context context) {
		super(context, DB_NAME, null, VERSION);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		 String sql = "create table " +
		 		"if not exists addresstable (" +
		 		"_id integer primary key autoincrement, " +
		 		"building varchar(100) not null, " +
		 		"address varchar(100) not null, " +
		 		"longitude varchar(10) not null, " +
		 		"latitude varchar(10) not null, " +
				 "city varchar(100) not null " +
//				 "city_id varchar(20) not null " +
		 		");";
		 db.execSQL(sql);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		// TODO Auto-generated method stub
	}
	
}
